<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>$.get实现</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <script>
        function fun() {
            $.get(
                "http://localhost:1314", 
                JSON.stringify({"name": "Jack"}),
                (data) => { // 成功回调
                    console.log(data);
                },
                "text"
            )
        }
    </script>
</head>

<body>
    <input type="button" value="发送异步请求" onclick="fun()">
</body>

</html>